1. Field of the Present Invention
The present invention is generally related to the field of data processing systems and more particularly to a device that provides an external debugger for a data processing system that communicates with an I2C compliant component.
2. History of the Related Art
Software and firmware written for computer systems require testing and debugging during the development phase to identify and remove code defects. Sometimes a code defect escapes detection and propagates to the field. These defects are typically not detected during development because they are intermittent in nature or are only triggered by unusual events. Debugging facilities are, therefore, important resources when a defect appears in the field. A typical debug tool communicates with the system through a debug port. The debug port enables programs to display progress messages from various points in the program flow. The port""s functionality may include the ability to capture, timestamp, and save progress messages, but also important transient information that is written to it at critical points in the program. This feature is commonly described as a xe2x80x9ctracexe2x80x9d or xe2x80x9cloggingxe2x80x9d feature. Unfortunately the debug port is typically implemented as a standardized serial port such as an RS232 port. In one implementation, a dedicated debug serial port that is otherwise unavailable to the user (i.e., is not supported by the operating system) is provided. In another, more common implementation, one of the operating system supported ports is used for debugging purposes. The former implementation results in additional cost for a dedicated debug port that might receive little if any use. The latter implementation may be problematic if the customer has utilized each available port for his or her own (non-debugging) purposes leaving no port available for debug purposes. In this situation, debugging would require removal of one of the customer""s peripheral device. In a worst case scenario, a device that is responsible for the bug or defect is the device that is swapped out when the debug facility is attached, thereby making it impossible to detect or analyze the problem. To avoid either of these undesirable situations, it would be highly desirable to implement a solution by which a debugging facility could be integrated with a data processing system without requiring a dedicated port and without consuming a port that would otherwise be available to the customer.
The problem identified above is addressed in large part by a debug card suitable for use with a data processing system. The card includes a microcontroller, a storage device connected to the microcontroller and, connected to the microcontroller, means for tapping into a communication bus of the data processing system where the communication bus communicates information between a processor of the data processing system and a display panel. The microcontroller is configured to record the information received by the display panel from the processor in the storage device when the debug card is connected to the communication bus. In one embodiment, the communication bus and the microcontroller are I2C compliant. In this embodiment, the debug card may have its own I2C address thereby enabling the debug card to communicate with the processor. The debug card may further include a serial port connected to the microcontroller. The serial port enables downloading the information stored in the storage device to an external computer. In addition, a user of the external computer may send commands to the data processing system through the serial port to customize the debug session. The debug card may further include a non-volatile storage device containing software enabling the microcontroller to communicate information to the processor. The means for tapping into the communication bus may include a tee connector having a debug port and a communication bus port. In this embodiment, a communication bus ribbon cable is connected to the communication bus port and a debug cable is connected to the debug port. At least a portion of the signals of the communication bus are routed to the debug card via the tee connector and the debug cable. The debug card may include a battery connected to the storage device and suitable for retaining the information in the storage device when external power to the debug card is disconnected.